vcTransportNode
Defines a logical place where product instances can be transported to and from. Each transport node has to be assigned a component container, but can also be connected to a motion path as a sensor. When connected as a sensor, the node will grab arriving products from the path to its component container and can similarly place leaving components to the connected path.
See in: Overview
Module: vcProcessModel
Parent: vcBehavior
Children -
Referenced by: vcBufferProductsStatement.DestinationTransportNode, vcProcessExecutor.TransportNode, vcProduct.LastEnteredNode, vcProductFeed.SourceNode, ... (see more)
vcBufferProductsStatement.DestinationTransportNode
vcProcessExecutor.TransportNode
vcProduct.LastEnteredNode
vcProductFeed.SourceNode
vcProductNeed.TargetNode
vcTransportLink.Destination
vcTransportLink.Source
vcTransportOutStatementBase.DestinationNode
vcTransportSolution.Destination
vcTransportSolution.Source
vcTransportSystem.Nodes
Properties
Learn how to use properties here. The properties are also inherited from the parent class.
| Name | Type | Access | Description |
| ComponentContainer | vcContainer | RW | Gets or sets the component container this node monitors for arriving products. Using other behavior than component container may cause issues. |
| DefaultProductPositionFrame | vcFrameFeature | RW | Gets or sets the default position for products. |
| DefaultResourcePositionFrame | vcFrameFeature | RW | Gets or sets the default position for resources. |
| ProcessExecutor | vcProcessExecutor | R | Gets the associated process executor.See moreThis property is read only; it's value can be changed by setting the transport node property on a process executor. |
| SensorFrame | vcFrameFeature | RW | Gets or sets the frame feature referenced as the sensor's physical location. Only used when connected to a path as sensor. |
| SensorResetAt | vcTriggerPosition | RW | Gets or sets the mode for resetting the sensor. See path constants for more information. Only used when connected to a path as sensor. |
| SensorTriggerAt | vcTriggerPosition | RW | Gets or sets the mode for triggering the sensor. See path constants for more information. Only used when connected to a path as sensor. |
| TransportLinks | vcList[vcTransportLink] | R | Gets the transport links coming into, and going out from, this node. |
| TransportSystem | vcTransportSystem | R | Gets the associated transport system. |
| VisualPosition | vcMatrix | R | Gets the visualization position of this node in world coordinates. |
| VisualPositionFrame | vcFrameFeature | RW | Gets or sets the component container this node monitors for arriving products. Using other behavior than component container may cause issues. |
Methods
Learn how to use methods here. The methods are also inherited from the parent class.
| Name | Return Type | Parameters | Description |
| beginTransportOut | None | vcProduct product | Begin the process of transporting the given product through its transport solution.See moreNote that transport is asynchronous i.e. the product won't leave immediately. Parameters: product (vcProduct): The product instance to begin transporting. |
| createTransportTarget | vcTransportTarget | vcProduct product | Creates a new transport target object for this node and assigns it for the given product instance.See moreThe target is created with the default values of this transport node. Replaces any existing transport target assigned to the given product in this node. Note that the node automatically deletes any transport targets when they are no longer needed. Parameters: product (vcProduct): The product to assign the transport target to. Returns: vcTransportTarget: The created transport target. |
| deleteTransportTarget | None | vcProduct product | Gets the transport target in this node assigned for a given product instance.See moreNote that the node automatically deletes any transport targets when they are no longer needed. Parameters: product (vcProduct): The product to get the transport target of. Returns: vcTransportTarget: The transport target of the given product. Returns None if a target is not defined. |
| getTransportTarget | vcTransportTarget | vcProduct product | Gets the transport target in this node assigned for a given product instance.See moreNote that the node automatically deletes any transport targets when they are no longer needed. Parameters: product (vcProduct): The product to get the transport target of. Returns: vcTransportTarget: The transport target of the given product. Returns None if a target is not defined. |
| setOnProductArriving | None | Callable OR None function | Sets the callback that is called when a product instance arrives to this node.See moreThe callback should return True if the node accepted this product and handled it. If the callback does not return True, the product will be handled by internal logic, which includes allowing process statements to receive it. Parameters: function (callable): The function to call when the event is triggered. Callback arguments: product (vcProduct): Product instance that arrived to this node. link (vcTransportLink): Link that the product arrived to this node from. |
| setOnProductLeaving | None | Callable OR None function | Sets the callback that is called when a product leaves this transport node.See moreLink is the link that the product left towards and can be None if the product doesn't have a transport solution or the solution doesn't have a transport link going out from this transport node. Parameters: function (callable): The function to call when the event is triggered. Callback arguments: product (vcProduct): Product instance that left this node. link (vcTransportLink): Link that the product left towards. |
| setOnTransportTargetRequested | None | Callable OR None function | Sets the callback that is called when a transport target is requested for the product.See moreIn practice, this happens each time that a transport controller or resource is transporting a product instance and needs a for the product instance. Parameters: function (callable): The function to call when the event is triggered. Callback arguments: product (vcProduct): Product instance that requested the transport target. target (vcTransportTarget): Requested transport target. |
Example: Assign New Target Location for the Requested Product
''' vcTransportNode: Assign new target location for the requested product ''' import vcCore as vc comp = vc.getComponent() transport_node = comp.findBehavior("TransportNode") def when_transport_target_requested(product, transport_target): product_matrix = transport_target.ProductPosition print(f"Original target: {product_matrix}") product_matrix.translateRel(0.0, 0.0, 1000.0) print(f"Modified target: {product_matrix}") transport_target.ProductPosition = product_matrix transport_node.setOnTransportTargetRequested(when_transport_target_requested)
Example: Change Machine Material to Red When It Gets Product
''' vcTransportNode: Change machine's material to red when it gets a product ''' import vcCore as vc app = vc.getApplication() red_matte = app.findMaterial('red_matte') white_matte = app.findMaterial('white_matte') comp = vc.getComponent() transport_node = comp.findBehavior("TransportNode") def when_product_arriving(product, link): comp.Material = red_matte transport_node.setOnProductArriving(when_product_arriving) def when_product_leaving(product, link): comp.Material = white_matte transport_node.setOnProductLeaving(when_product_leaving)
Example: Event Handler When a Product Arrives to or Leaving From Node
''' vcTransportNode: Event handler when a product arrives to or leaving from node ''' import vcCore as vc comp = vc.getComponent() transport_node = comp.findBehavior("TransportNode") def when_product_arriving(product, link): print(f"Arriving: {product}, {link}") transport_node.setOnProductArriving(when_product_arriving) def when_product_leaving(product, link): print(f"Leaving: {product}, {link}") transport_node.setOnProductLeaving(when_product_leaving)